const init={
   navlist:[],
   headertop:{},
   infolist:[],
   id:'',
   studio:false,
   loading:true,
   wbk:''
}
export default (state = init , action) => {
   var newState=JSON.parse(JSON.stringify(state))
   switch (action.type) {
      case 'DATA':
         newState.navlist = action.navlist
         newState.headertop = action.headertop
         return newState;
      case 'ID':
         // var newState={...state}
         newState.id = action.id
         newState.studio=!newState.studio
         return newState;
      case 'LIST':
            // var newState={...state}
            newState.infolist =action.infolist
            console.log("infolist:",newState.infolist)
            newState.loading=false
            return newState;
      case 'WBK':
         newState.wbk = action.wbk
         console.log(newState.wbk)
         return newState;
      default:
         return state
   }
}